package model

// 账户信息保存
type ReqGoodsAccount struct {
	Id             int      `json:"id" xorm:"not null pk autoincr INT(10)" `
	Username       string   `json:"username" binding:"required" required_err:"请输入用户名"`
	Password       string   `json:"password"`
	Phone          string   `json:"phone" binding:"required,len=11,numeric" required_err:"请输入手机号" len_err:"请输入正确的手机号" numeric_err:"请输入正确的手机号"`
	Name           string   `json:"name"`
	Role           string   `xorm:"" json:"role" form:"role" binding:"required" required_err:"请选择所属角色"`
	Nickname       string   `json:"nickname"`
	Avatar         string   `json:"avatar"`
	ExpireTime     int64    `json:"expire_time" binding:"required" required_err:"请选择过期时间"`
	Salt           string   `json:"salt"`
	GoodsIds       []string `xorm:"-" json:"goods_ids"  binding:"required" required_err:"请选择所属商品"`
	BindGoodsIds   string   `xorm:"" json:"bind_goods_ids"`
	UseStorageAcid int      `xorm:"" json:"use_storage_acid"`
	Pid            int      `xorm:"" json:"pid" form:"pid"`
	CreatedAt      int      `xorm:"created" json:"created_at"`
	UpdatedAt      int      `xorm:"updated" json:"updated_at"`
	DeletedAt      int      `xorm:"deleted" json:"deleted_at"`
}

func (ReqGoodsAccount) TableName() string {
	return "account"
}
